﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WebQQ
{
    static class Start
    {
        //[STAThread]
        //static void Main()
        //{
        //    QQClient client = null;
        //    try
        //    {
        //        client = QQClient.Login("753668790", "jiailiuyan1314", VerifyForm.Verify);
        //        QQFriend friend = client.Friends.FirstOrDefault(f => f.QQNumber == "366006820");
        //        if (friend != null)
        //            client.SendMessage(friend, "WebQQ");
        //        Console.WriteLine("QQ登录成功！");

        //        client.Message += new MessageEventHandler(client_Message);
        //    }
        //    catch (Exception ex)
        //    {
        //        Console.WriteLine(ex.Message);
        //    }

        //    try
        //    {
        //        while (Console.ReadKey().Key != ConsoleKey.Escape) ;
        //    }
        //    finally
        //    {
        //        if (client != null) client.Logout();
        //    }
        //}

        static void client_Message(object sender, MessageEventArgs e)
        {
            Console.WriteLine(e.QQ.Nick + " " + e.Time + "：");
            Console.WriteLine("    " + e.Message);
        }
    }
}
